package xinxin.com.StatePattern.Work;

import xinxin.com.StatePattern.State.State;
import xinxin.com.StatePattern.State.StateDetail.ForenoonState;

/**
 * @author ：史鑫鑫
 * @date ：Created in 2019/3/26 9:34
 */
public class Work {
    private State state;
    private int hour;
    private boolean finish;

    public Work() {
        this.state = new ForenoonState();
        this.hour = 0;
        this.finish = false;
    }

    public State getState() {
        return state;
    }

    public void setState(State state) {
        this.state = state;
    }

    public int getHour() {
        return hour;
    }

    public void setHour(int hour) {
        this.hour = hour;
    }

    public boolean isFinish() {
        return finish;
    }

    public void setFinish(boolean finish) {
        this.finish = finish;
    }

    public void WriteProgram() {
        state.WriteProgram(this);
    }
}
